﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Validity.Test
{
  [TestClass]
  public class RuleViolationTest
  {
    [TestMethod]
    public void TestExplicitConversionFromString()
    {
      var violation = (RuleViolation)"My Violation";

      Assert.AreEqual("My Violation", violation.Message);
    }

    [TestMethod]
    public void TestImplicitConversionToString()
    {
      String message = new RuleViolation("My Violation");

      Assert.AreEqual("My Violation", message);
    }

    [TestMethod]
    public void TestToString()
    {
      Assert.AreEqual("My Violation", new RuleViolation("My Violation").ToString());
    }
  }
}
